
#version 430 core
struct ModelData
{
    vec4 position;
    vec4 normal;
    vec4 color;
};

layout (std430, binding=0)buffer Mesh{
    ModelData vertexes[];
}mesh;

uniform mat4 view;
uniform mat4 projection;

out vec4 vs_color;

void main()
{
    vs_color = vec4(mesh.vertexes[gl_VertexID].color.xyz,1.0);
    gl_Position = projection * view * vec4(mesh.vertexes[gl_VertexID].position.xyz, 1.0);
}

